package game.tileMap.model
{
	import game.tileMap.model.vo.MonsterVo;
	
	public class Monster extends Battler
	{
		private var vo:MonsterVo
		public var  monster_id:String ;
		public var original_name  :String,letter :String;
		public var monster:XML;
		public var plural:Boolean;
		public var screen_x :Number,screen_y:Number;
		public function Monster(index:int,id:String)
		{
			super();
			this.index = index;
    		monster_id = id;
    		
    		this.vo=db.getMonsterVo(monster_id);
    		trace("怪物名"+vo.name)
   			original_name =vo.name
    		letter = ""
    		plural = false
    		screen_x = 0
    		screen_y = 0
    		battler_name = vo.battler_name
    		battler_hue = vo.battler_hue
    		hp = maxhp
    		mp = maxmp
    		
		}
		
		override protected function init():void{
			super.init();
				
			skillIdList=[1,2,4]
		}
		
		
		
		
		override public function get base_maxhp():int{
			return vo.maxhp;
		}
		
		override public function get base_maxmp():int{
			return vo.maxmp;
		}
		
		override public function get base_atk():int{
			return vo.atk;
		}
		
		override public function get base_def():int{
			return vo.def;
		}
		
		override public function get base_spi():int{
			return vo.spi;
		}
		
		override public function get base_agi():int{
			return vo.agi;
		}
		
		override public function get hit():int{
			return vo.hit;
		}
		
		override public function get eva():int{
			return vo.eva;
		}
		
		//获取会心一击率
		override public function get cri():int{
			return 0
		}
		//获取受击率
		override public function get odds():int{
			return 1;
		}
		
		
		override public function getElementRate(element_id:int):int{
			var result:int = vo.getElementRate(element_id);
//			for state in states
//			result /= 2 if state.element_set.include?(element_id)
//			end
			return result
		}
		
	}
}